<?php


namespace backend\modules\tool\controllers;


use backend\modules\tool\DataSource\Task\prcoess\LinuxProcess;
use yii\console\Controller;

class TestController extends Controller
{
    public function actionIndex(){
        $p=new LinuxProcess(5);
        $p->addTask(function (){
//            sleep(10);
            sleep(10);

            echo "10";
        })->addTask(function () {
            sleep(3);
            echo "3";
            echo "run_at_me";
        })->start();
    }
}